home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / amos / cd32jypd.lha / CD32-Joypad / CD32.AMOS / CD32.amosSourceCode < prev   
AMOS Source Code  |  1996-04-09  |  2KB  |  66 lines

  1. '
  2. '    CD32 Joypad 
  3. '
  4. '    (c) K.Hill, Jan 1996
  5. '        
  6. '
  7. 'structures begin
  8. '
  9. 'Const JPF_BUTTON_FORWARD=$80000 
  10. 'Const JPF_LEFT  = 2 
  11. 'Const JPF_JOY_UP  = 8   
  12. 'Const JPF_BUTTON_REVERSE  =  $40000 
  13. 'Const JPF_DOWN  = 4   
  14. 'Const JPF_JOY_RIGHT  = 1    
  15. 'Const JPF_JOY_LEFT  = 2 
  16. 'Const JPF_BUTTON_GREEN  =  $100000  
  17. 'Const JPF_BUTTON_YELLOW  =  $200000 
  18. 'Const JPF_JOY_DOWN  = 4 
  19. 'Const JPF_BUTTON_BLUE  =  $800000 
  20. 'Const JPF_UP  = 8 
  21. 'Const JPF_BUTTON_PLAY  =  $20000  
  22. 'Const JPF_BTN1  =  $800000  
  23. 'Const JPF_BTN2  =  $400000  
  24. 'Const JPF_BTN3  =  $200000  
  25. 'Const JPF_BTN4  =  $100000  
  26. 'Const JPF_BTN5  =  $80000 
  27. 'Const JPF_RIGHT  = 1  
  28. 'Const JPF_BTN6  =  $40000 
  29. 'Const JPF_BTN7  =  $20000 
  30. 'Const JPF_BUTTON_RED  =  $400000  
  31. '
  32. 'Structures Constants
  33.  
  34. Global __JPF_BUTTON_FORWARD,__JPF_LEFT,__JPF_JOY_UP
  35. __JPF_BUTTON_FORWARD=524288 : __JPF_LEFT=2 : __JPF_JOY_UP=8
  36. Global __JPF_BUTTON_REVERSE,__JPF_DOWN,__JPF_JOY_RIGHT
  37. __JPF_BUTTON_REVERSE=262144 : __JPF_DOWN=4 : __JPF_JOY_RIGHT=1
  38. Global __JPF_JOY_LEFT,__JPF_BUTTON_GREEN,__JPF_BUTTON_YELLOW
  39. __JPF_JOY_LEFT=2 : __JPF_BUTTON_GREEN=1048576 : __JPF_BUTTON_YELLOW=2097152
  40. Global __JPF_JOY_DOWN,__JPF_BUTTON_BLUE,__JPF_UP
  41. __JPF_JOY_DOWN=4 : __JPF_BUTTON_BLUE=8388608 : __JPF_UP=8
  42. Global __JPF_BUTTON_PLAY,__JPF_BTN1,__JPF_BTN2
  43. __JPF_BUTTON_PLAY=131072 : __JPF_BTN1=8388608 : __JPF_BTN2=4194304
  44. Global __JPF_BTN3,__JPF_BTN4,__JPF_BTN5,__JPF_RIGHT
  45. __JPF_BTN3=2097152 : __JPF_BTN4=1048576 : __JPF_BTN5=524288 : __JPF_RIGHT=1
  46. Global __JPF_BTN6,__JPF_BTN7,__JPF_BUTTON_RED
  47. __JPF_BTN6=262144 : __JPF_BTN7=131072 : __JPF_BUTTON_RED=4194304
  48.  
  49. 'structures end
  50. Lib Open 1,"lowlevel.library",40
  51.  
  52. Dreg(0)=1
  53. While 1
  54.    Z=Lib Call(1,-30)
  55.    If Z and __JPF_BUTTON_BLUE Then Print "Blue"
  56.    If Z and __JPF_BUTTON_RED Then Print "Red"
  57.    If Z and __JPF_BUTTON_GREEN Then Print "Green"
  58.    If Z and __JPF_BUTTON_YELLOW Then Print "Yellow"
  59.    If Z and __JPF_BUTTON_PLAY Then Print "Play"
  60.    If Z and __JPF_BUTTON_FORWARD Then Print "FF"
  61.    If Z and __JPF_BUTTON_REVERSE Then Print "Rew"
  62.    If Z and __JPF_JOY_DOWN Then Print "Down"
  63.    If Z and __JPF_JOY_UP Then Print "Up"
  64.    If Z and __JPF_JOY_LEFT Then Print "Left"
  65.    If Z and __JPF_JOY_RIGHT Then Print "Right"
  66. Wend